package com.tramy.cn.push.common;

public class PushRes {

    public static final int UN_SUPPORT = 189;

    public static final int ERROR = 185;

    public static final int NETWORK_ERROR = 181;

    public static final int SUCCESS = 0;

    private Integer code;

    private String msg;

    private Object data;

    public Integer getCode() {
        return code;
    }

    public String getMsg() {
        return msg;
    }

    public Object getData() {
        return data;
    }

    public static PushRes ok() {
        PushRes res = new PushRes();
        res.code = SUCCESS;
        return res;
    }

    public static PushRes build(Integer code) {
        PushRes res = new PushRes();
        res.code = code;
        return res;
    }

    public static PushRes build(Integer code,
                                String msg) {
        PushRes res = new PushRes();
        res.code = code;
        res.msg = msg;
        return res;
    }

}
